package test.util.tmall;

import org.junit.Test;

import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.UserSellerGetRequest;
import com.taobao.api.response.UserSellerGetResponse;

public class TmallClient {
	
	private String url="http://gw.api.taobao.com/router/rest";
	private String appkey="23055821";
	private String secret="a9fee0f44840016763d3c9a145f03982";
	private String sessionKey="610250061c3809147da3df4d796ea974ad66dd8e268c0cf2130474118";
	
	@Test
	public void addTest() throws Exception{
		TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
		UserSellerGetRequest req = new UserSellerGetRequest();
		req.setFields("nick,sex");
		UserSellerGetResponse rsp = client.execute(req, sessionKey);
		System.out.println(rsp.getBody());
	}
}
